#!/bin/bash
:<<EOF
中国node镜像
cnpm
	http://npm.taobao.org/
	http://cdn.npm.taobao.org/dist/node/v7.7.2/node-v7.7.2-linux-x64.tar.gz
	PATH=$PATH:/usr/local/node-v7.7.2-linux-x64/bin

	npm install -g cnpm --registry=https://registry.npm.taobao.org
	now can use cnpm

环境变量
/etc/bashrc
	PATH=$PATH:/usr/local/node-v7.7.2-linux-x64/bin:/usr/local/apache-maven-3.3.9/bin
	JAVA_HOME=/etc/alternatives/java_sdk_1.8.0_openjdk

setting.xml
  maven中国镜像
EOF

echo "delete old"
rm -rf src/main/webapp/static/js/js/*

pushd src/main/webapp/static/js
 if [ ! -d node_modules ]; then
	cnpm install
 fi
 echo "compile typescript and vue"
 tsc
 echo "compile typescript and vue and vue components"
 webpack
popd
